package com.example.bilibili.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.bilibili.domain.uservideovo;
import com.example.bilibili.domain.videovo;
import com.example.bilibili.mapper.BiliVideoMapper;
import com.example.bilibili.service.BiliVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import java.util.List;

@RestController
public class QTVideoController {
    @Autowired
    private BiliVideoService biliVideoService;
    @Autowired
    private BiliVideoMapper biliVideoMapper;
    @RequestMapping("/getvideo")
    public Object getvideo(){
        List<videovo> list = biliVideoMapper.getvideoList();
        return  JSON.toJSONString(list);
    }
    @RequestMapping("/getvideolike")
    public Object getvideolike(String check){
        List<videovo> list = biliVideoMapper.getvideoListlike(check);
        return  JSON.toJSONString(list);
    }
    @RequestMapping("/getuservideo")
    public Object getuservideo(Long userid){
        List<uservideovo> list = biliVideoMapper.getuservideoList(userid);
        return  JSON.toJSONString(list);
    }

}
